#include <stdio.h>
static const char enc_key[] = "kuuhnPnwZrcqrmsdudtszrpq9ayiydzgxwjbqmvpuuudy0ccdlwyqdodnlvonejqafdgdriljay~desovnrwggztkuxkdghaltbb";
static void dec(char *data, int len)
{
    int i = 0;
	for (; i < len; i++)
	{
		if (data[i] < 0)
		{
			data[i] = 256 + data[i] - enc_key[i%sizeof(enc_key)];
		}
		else
		{
			data[i] -= enc_key[i%sizeof(enc_key)];
		}
	}
}

int main(int argc, char** argv)
{
	FILE* fp = fopen("./nClock.nz", "r");
	if (fp)
	{
		fseek(fp, 0, SEEK_END);
		int length = ftell(fp);
		fseek(fp, 0, SEEK_SET);
		char * data = new char[length];
		fread(data, 1, length, fp);
		dec(data,length);
		fclose(fp);
		FILE *output = fopen("./tt.lua", "w");
		if (output)
		{
			fwrite(data, length, 1, output);
			fclose(output);
			
		}



	}
}